package org.mybatis3.demo1;

import org.apache.ibatis.session.SqlSession;
import org.mybatis3.demo1.dao.RoleMapper;
import org.mybatis3.demo1.dao.UserMapper;
import org.mybatis3.demo1.pojo.Role;
import org.mybatis3.demo1.pojo.User;
import org.mybatis3.util.MyBatisUtil;

import java.util.List;

public class Test12 {
    public static void main(String[] args) {
        SqlSession sqlSession= MyBatisUtil.getSqlSession();
        Role role=new Role();
        role.setId(1L);
        role.setRoleName("超级管理员");
        role.setRoleCode("SMBMS_ADMIN1");

        int mCount=sqlSession.getMapper(RoleMapper.class).update(role);

        sqlSession.commit();


        MyBatisUtil.closeSqlSession();
    }
}
